<?php

namespace Product\Model;

use Zend\Db\TableGateway\AbstractTableGateway;
use Zend\Db\Adapter\Adapter;
use Zend\Db\Sql\Select;
use App\Open\Recursive;

class User extends AbstractTableGateway {
	
	protected $tableGateway;
	protected $table = 'user';
	protected $error = 0;
	
	public function __construct(Adapter $adapter) {
		$this->adapter = $adapter;
	}
	
    public function user(Select $select = null,$email) {
		if (null === $select)
			$select = new Select ();
		$select->from ( $this->table )
		       ->where(array('EMAIL_USER'=>$email));
		$resultSet = $this->selectWith ( $select );
		$resultSet->buffer ();
		return $resultSet->toArray ();
	}
	
	public function Data() {
		return "Data";
	}
	
	public function getData() {
		return "getData";
	}
	
}